-module(classupdate_side_effect).

-include_lib("ect/include/ect.hrl").

-import_class(pattern1).
-import_class(pattern2).

-export([dotest/0]).

dotest() ->
    T = #pattern2{a = xa, b = Z = xb, c = xc} = a(#pattern2{}),
    xb = Z,
    P = pass,
    T#pattern1{a = U = P},
    Puma = U,
    T#pattern1{a = V = P, b = bLa},
    Puma = V,
    T#pattern1{c = bLa, a = Q = P},
    Puma = Q,
    Puma.

a(#pattern1{} = A) ->
    A#pattern1{c = xc, a = xa, b = xb}.
